﻿//Created: 23/06/2014 by Xenon
//Professions:
//Talents: 15:Void Tendrils | 30:Body and Soul | 45:Solace and Insanity | 60:Angelic Bulwark | 75:Twist of Fate | 90:Halo
//Glyphs: Inner Sanctum | Mind Flay | Dark Archangel | Shadowy Friends | Shadow Ravens
//Revision: 0.0.1

using CommonBehaviors.Actions;
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
using Styx.TreeSharp;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using Action = Styx.TreeSharp.Action;

#region [Method] - Class Redundancy
using HKM = Ilusión.Core.Managers.Hotkey_Manager;
using R = Ilusión.Rotation.Rotation;
using U = Ilusión.Core.Unit;
#endregion

namespace Ilusión
{
    public class Main : CombatRoutine
    {
        private static readonly Version version = new Version(0, 0, 1);

        public override string Name
        {
            get { return "Priest (Shadow) v" + version; }
        }

        public override WoWClass Class
        {
            get { return WoWClass.Priest; }
        }

        private static LocalPlayer Me
        {
            get { return StyxWoW.Me; }
        }


        #region [Method] - Implementations

        private Composite _preCombatBehavior, _combatBuffBehavior, _combatBehavior;

        public override Composite PreCombatBuffBehavior
        {
            get { return _preCombatBehavior ?? (_preCombatBehavior = R.preCombatBuffing()); }
        }

        public override Composite CombatBuffBehavior
        {
            get { return _combatBuffBehavior ?? (_combatBuffBehavior = R.combatBuffing()); }
        }

        public override Composite CombatBehavior
        {
            get { return _combatBehavior ?? (_combatBehavior = R.rotationSelector()); }
        }

        #endregion

        #region [Method] - Hidden Overrides

        public override void Initialize()
        {
            Logging.Write(Colors.Purple, "Hello {0}!", Me.Name);
            Logging.Write(Colors.White, "");
            Logging.Write(Colors.Purple, "For optimal performance please use: Tyrael");
            Logging.Write(Colors.White, "");
            Logging.Write(Colors.Purple, "Current Version:");
            Logging.Write(Colors.Purple, "-- Shadow v" + version + " --");
            Logging.Write(Colors.Purple, "-- by Xenon | guides from Dagradt --");
            Logging.Write(Colors.Purple, "-- A Priest CombatRoutine --");
            HKM.registerHotKeys();
        }

        public override bool WantButton
        {
            get { return true; }
        }

        public override void OnButtonPress()
        {
            Logging.Write(Colors.Purple, "Coming soon!");
        }

        public override void ShutDown()
        {
            HKM.removeHotkeys();
        }

        #endregion

        #region [Method] - Pulse

        public override void Pulse()
        {
            if (!StyxWoW.IsInWorld || Me == null || !Me.IsValid || !Me.IsAlive)
                return;
            if (!Me.Combat)
                return;
            U.Cache();
            U.enemyAnnex(40);
        }

        #endregion
    }
}